define(['app', 'assets/js/distpicker.min.js'],function(app){return {module: function($scope, $http, eventBusService, httpService, params) {









		//学年学期
		httpService.post(app.urls.prop_select,{},function(data){
			if("0000" === data.code){
				$scope.propList = data.data;
			}else{
				alert(data.msg);
			}
		});
		//年级
		httpService.post(app.urls.grade_select,{fk_stage:"02030218-1e1c-4dc8-81f5-10e0ceb015a4"},function(data){
			if("0000" === data.code){
				$scope.gradeList = data.data;
			}else{
				alert(data.msg);
			}
		});

		$scope.save = function(){
			if($scope.formCheck()){

				httpService.post(app.urls.leave_task_insert,$scope.form,function(data) {
					if ("0000" === data.code) {
						eventBusService.publish("modal.alert", {"content": "添加成功"});
						eventBusService.publish("content.page.reload", data.data);
						eventBusService.publish("modal.page.close", {});
					}else {
						alert(data.msg);
					}
				})
			}
		}


}}});